﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LZH.Models
{
    public class BlogSystemContext: DbContext
    {
        public BlogSystemContext() : base("conn")
        {

            Database.SetInitializer<BlogSystemContext>(null);
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>();
            modelBuilder.Conventions.Remove<ManyToManyCascadeDeleteConvention>();
        }

        public DbSet<basicInformationTable> basicInformationTable { get; set; }
        public DbSet<imageTable> imageTable { get; set; }
        public DbSet<journalTable> journalTable { get; set; }
        public DbSet<juestBook> juestBook { get; set; }
        public DbSet<logClassTable> logClassTable { get; set; }
        public DbSet<mainTable> mainTable { get; set; }
        public DbSet<microList> microList { get; set; }
        public DbSet<UserTable> UserTable { get; set; }


    }
}
